import store from '@/store'
export const imgerror = {
  inserted: (dom, options) => {
    dom.onerror = function() {
      dom.src = options.value
    }
  }
}

export const allow = {
  inserted: (dom, options) => {
    // 从vuex中取出points,
    const points = store.state.user.userInfo.roles.points
    if (!points.includes(options.value)) {
      dom.style.display = 'none'
    }
  }
}
